#include <stdio.h>
#include <stdlib.h>

#include "conn.h"

conn_tab_t conn_tab;

struct sockaddr_in get_addr(char* addr, int port){
	struct sockaddr_in addr;
	addr.sin_family = AF_INET;
	addr.sin_addr.s_addr = inet_addr(addr);
    	addr.sin_port = htons(port);
	return addr;
}

void test(){
	char* addr1 = "115.29.42.68";
	int port = 10000;
	struct sockaddr_in addr;
	int fd = 10;
	conn_t* conn;

	conn_tab_init(&conn_tab);

	addr = get_addr(addr1, port);    
	conn = create_conn(fd, addr);
	conn_tab_add(&conn_tab, conn);
}

void test_find(){
}

int main(){
	test();
}
